#!/bin/sh

preinit_btrfs_scan() {
	if grep -q btrfs /proc/filesystems; then
		btrfs device scan -d > /dev/kmsg
	fi
}

boot_hook_add preinit_main preinit_btrfs_scan
